package com.shopoo.behavior.api;

import com.shopoo.behavior.dto.clientobject.BehaviorLikeCO;
import com.shopoo.behavior.dto.cqe.BehaviorLike;
import com.shopoo.behavior.dto.cqe.BehaviorLikeAddCmd;
import com.shopoo.behavior.dto.cqe.BehaviorLikeCancelCmd;
import com.szmengran.cola.dto.SingleResponse;

/**
 * @Description: 点赞服务
 * @Package com.szmengran.behavior.service
 * @date Mar 4, 2019 12:54:29 PM
 * @author <a href="mailto:android_li@sina.cn">Joe</a>
 */
public interface LikeService {

    /**
     * 新增点赞记录
     * @param behaviorLikeAddCmd
     * @return
     * @throws Exception 
     * @author <a href="mailto:android_li@sina.cn">Joe</a>
     */
    SingleResponse<Boolean> like(BehaviorLikeAddCmd behaviorLikeAddCmd);
    
    /**
     * 取消点赞
     * @param behaviorLikeCancelCmd
     * @return
     * @throws Exception 
     * @author <a href="mailto:android_li@sina.cn">Joe</a>
     */
    SingleResponse<Boolean> cancel(BehaviorLikeCancelCmd behaviorLikeCancelCmd);
    
    /**
     * 根据ID查找点赞信息
     * @param behaviorLike
     * @return
     * @throws Exception 
     * @author <a href="mailto:android_li@sina.cn">Joe</a>
     */
    SingleResponse<BehaviorLikeCO> findById(BehaviorLike behaviorLike);
    
    /**
     * 检查是否已经点赞
     * @param behaviorLike
     * @return
     * @throws Exception 
     * @author <a href="mailto:android_li@sina.cn">Joe</a>
     */
    SingleResponse<Boolean> checkLike(BehaviorLike behaviorLike);
    
    /**
     * 
     * @param promotionid
     * @param shareuserid
     * @return
     * @throws Exception 
     * @author <a href="mailto:android_li@sina.cn">Joe</a>
     */
    SingleResponse<Integer> getLike(String promotionid, String shareuserid);
}
